﻿using FreeSql.DatabaseModel;using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace Simple.Repository.SimpleEntitys {

	/// <summary>
	/// 系统省市区
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(Name = "sys_places", DisableSyncStructure = true)]
	public partial class SysPlaces {

		/// <summary>
		/// 地区Id
		/// </summary>
		[JsonProperty, Column(Name = "id", DbType = "smallint unsigned", IsPrimary = true, IsIdentity = true)]
		public ushort Id { get; set; }

		/// <summary>
		/// 父级Id
		/// </summary>
		[JsonProperty, Column(Name = "parent_id", DbType = "smallint unsigned")]
		public ushort ParentId { get; set; } = 0;

		/// <summary>
		/// 地区名称
		/// </summary>
		[JsonProperty, Column(Name = "cname", StringLength = 120, IsNullable = false)]
		public string Cname { get; set; }

		/// <summary>
		/// 地区类型：0=国家、1=省份、2=城市、3=地区
		/// </summary>
		[JsonProperty, Column(Name = "ctype", DbType = "tinyint(1)")]
		public sbyte Ctype { get; set; } = 2;

	}

}
